<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
	<title>登录</title>
	<%@ include file="/common/common.jsp" %>
	<script type="text/javascript">
		$(document).ready(function(){
			$("input:submit").button();
			$("#loginForm").validate({
				rules: {
					'j_username': {
						required:true
					},
					'j_password': {
						required:true
					}
				},
				messages: {
					'j_username': {
						required:'请输入登录名'
					},
					'j_password': {
						required:'请输入密码'
					}
				}
			});
		});
	</script>
</head>
<body>
    <form method="post" id="loginForm" action="<%= request.getContextPath() %>/j_spring_security_check">
    <table class="normalTab">
		<tr>
			<td>
	        <p>用户名：</p>
	        </td>
	        <td>
	        <p><input type="text" name="j_username" id="j_username" /></p>
	        </td>
        </tr>
        <tr>
        	<td>
        	<p>密码：</p>
        	</td>
        	<td>
        	<p><input type="password" name="j_password" id="j_password" /></p>
        	</td>
        </tr>
        <tr>
        <td colspan="2">
        	<input type="submit" class="normalBtn" value="登录" />
        </td>
        </tr>
        <% if("true".equals(request.getParameter("error"))){ %>
        <tr><td colspan="2"><span style="color: red">用户名或密码错误</span></td></tr>
        <% } %>
    </table>
    </form>
</body>
</html> 